#region Usings

using System;
using System.ComponentModel;
using System.Linq.Expressions;

#endregion

namespace KanbanBoard.Client.ViewModel {
    public class ViewModel : INotifyPropertyChanged {
        public event PropertyChangedEventHandler PropertyChanged;

        protected void NotifyChanged<T>(Expression<Func<T>> property) {
            var memberExpression = (MemberExpression)property.Body;
            if (PropertyChanged != null) {
                PropertyChanged(this, new PropertyChangedEventArgs(memberExpression.Member.Name));
            }
        }
    }
}